package com.bdqn.spark.chapter05.action

import org.apache.spark.{SparkConf, SparkContext}

object Spark04_RDD_Operator_Action {
  def main(args: Array[String]): Unit = {
    val sparkConf = new SparkConf().setMaster("local[*]").setAppName("action-reduce")
    val sc = new SparkContext(sparkConf)

    val rdd = sc.makeRDD(List(1,2,3,4))

    // first : 获取数据源中数据的第一个
    val first = rdd.first()
    println(first)

    sc.stop()
  }
}
